<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.jaxplat.commons.Row" %>
<%@ page import="com.rs.util.Utils" %>
<%@ page import="com.jaxplat.util.StringUtils" %>
<%
    String contextPath = request.getContextPath();
	List secList = null;
	int totalCount =0;
 	String pagingHtml = "";
 	String parentCatId = "";
	String childCatId = "";
	String cityName = "";
	String selectedParentCat = "";
	String selectedChildCat = "";
 	if(null != request.getAttribute("parent_cat")&& !StringUtils.isEmpty(request.getAttribute("parent_cat")))
 	{
 	   selectedParentCat = (String)request.getAttribute("parent_cat");
 	}
 	if(null != request.getAttribute("child_cat") && !StringUtils.isEmpty(request.getAttribute("child_cat")))
 	{
 	   selectedChildCat = (String)request.getAttribute("child_cat");
 	}
 	if(null != request.getAttribute("curr_city_name"))
 	{
 	    cityName = (String)request.getAttribute("curr_city_name");
 	}
	if(null != request.getAttribute("rows"))
	{
	    secList = (List)request.getAttribute("rows");
	}
	else
	{
	    secList = new java.util.ArrayList();
	}
	
	if(null != request.getAttribute("totalCount"))
	{
	    totalCount = ((Integer)request.getAttribute("totalCount")).intValue();
	}
	if(null != request.getAttribute("pagingHtml"))
	{
	    pagingHtml = (String)request.getAttribute("pagingHtml");
	}
%>
	


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="预约挂号,预约诊疗,门诊预约,网上医院,网上挂号" name="Keywords">
<meta content="预约挂号平台提供各大三甲医院知名专家的网上预约就医服务。同时提供就医咨询、导医陪诊、专家会诊、住院转院、安排手术等服务" name="description">
<title>科室列表-云南移动无线城市</title>
<link rel="stylesheet" type="text/css" href="<%=contextPath %>/css2/style.css">
<link rel="stylesheet" type="text/css"
	href="<%=contextPath %>/js/jquery-easyui-1.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="<%=contextPath %>/js/jquery-easyui-1.3/themes/icon.css">	
<script type="text/javascript"
	src="<%=contextPath %>/js/jquery-easyui-1.3/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="<%=contextPath %>/js/jquery-easyui-1.3/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="<%=contextPath %>/js/jquery-easyui-1.3/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=contextPath %>/js/common.js"></script>
<script type="text/javascript">


$(function(){
	    var selected_child_cat = '<%=selectedChildCat%>';
		$("#parent_cat").combobox({
			url:'<%=contextPath %>/web2/secAction.do?method=getParentCatalogs',
			valueField:'id',
			textField:'name',
			onSelect:function(rec)
			{
				
				var childUrl = '<%=contextPath %>/web2/secAction.do?method=getCatalogOfParent&id='+rec.id;
				
				$("#child_cat").combobox({
					url: childUrl,
					valueField:'id',
					textField:'name',
					onSelect:function(rec2)
					{
						
					},
					onLoadSuccess: function(){
						if(selected_child_cat != '')
						{
							$("#child_cat").combobox('select',selected_child_cat);
							selected_child_cat = '';
						}
					}
				});
			},
			onLoadSuccess: function()
			{
				var selected_parent_cat = '<%=selectedParentCat%>';
				if(selected_parent_cat != '')
				{
					$("#parent_cat").combobox('select',selected_parent_cat);
				}
			}
		});
});
function searchSec()
{
	var v_parent_cat = $('#parent_cat').combobox('getValue');
	var v_child_cat = $('#child_cat').combobox('getValue');			
	var href = '<%=contextPath%>/web2/secAction.do?method=searchSec';
	if(v_parent_cat != '')
	{
		href += '&pc='+v_parent_cat;
	}
	if(v_child_cat != '')
	{
		href += '&cc='+v_child_cat;
	}
	location.href = href;
}
function clearForm()
{
	$("#frmSearch").form('clear');
}

function doPagination(index)
{
	var url= '<%=contextPath%>/web2/secAction.do?method=searchSec&page=' + index;
	location.href = url;
}

</script>

<!--[if IE 6]>
 <style type="text/css">
 .w942m {
	width:942px;
	margin:0 auto;
	margin-top:150px;
}
.main_left .main_box_title {
	background: url("../images/h4bg.png") no-repeat scroll left top transparent;
	height:43px;
	margin-left:-10px;
	position:absolute;
	top:10px;
}
 </style>
<![endif]-->

<!--[if IE 7]>
 <style type="text/css">
 .w942m {
	width:942px;
	margin:0 auto;
	margin-top:150px;
}
.main_left .main_box_title {
	background: url("../images/h4bg.png") no-repeat scroll left top transparent;
	height:43px;
	margin-left:-10px;
	position:absolute;
	top:10px;
}
 </style>
<![endif]-->

</head>
<body>
<%=request.getSession().getAttribute("headerContentWeb") %>
<div class="guahao"> 
  <!--start header-->
  
    <%@ include file="head.jsp"%> 
    
  <!--end header-->
  <div class="clear mb8"></div>
  <!--start main-->
  <div class="main w942m">
    <div class="main_left fl">
      <div class="main_box">
        <div class="main_box_title">
          <div class="titleleft fl"></div>
          <div class="left_titlemain fl">
            <h4 class="h4">科室导航</h4>
          </div>
          <div class="titleright fl"></div>
        </div>
        <div class="left_main_box_cont">
          <div class="mb7">
          	  <form id="frmSearch">
              <p class="fl" style="width:60px;text-align:right;">科 室：</p>
              <p class="fl" style="width:160px;">
						<input class="easyui-combobox" id="parent_cat" name="parent_cat" 
							   style="width:150px;" 
							   data-options="editable:false,valueField:'id',textField:'name',style:{width:150}" />
              </p>
              <p class="fl" style="width:70px;margin-left:15px;text-align:right;">科室分类：</p>
              <p class="fl" style="width:160px"> 
					<input id="child_cat" class="easyui-combobox" name="child_cat" 
									style="width:150px;" 
									data-options="editable:false,valueField:'id',textField:'name',style:{width:150}"/>             		
              </p>
              <p>
              		<a href="javascript:" onclick="searchSec()" class="easyui-linkbutton">查&nbsp;&nbsp;询</a>&nbsp;&nbsp;
              		<a href="javascript:" onclick="clearForm()" class="easyui-linkbutton">清&nbsp;&nbsp;除</a>
			  </p>
              <div class="clear"></div>
              </form>
            </div>

        </div>
        <div class="left_box_bottom mb8"></div>
      </div>
      <!--end main_box-->
      <div class="main_box">
        <div class="main_box_title">
          <div class="titleleft fl"></div>
          <div class="left_titlemain fl">
            <h4 class="h4 w_auto"><span class="red">&nbsp;</span>共有 <span class="red"><%=totalCount %></span> 个科室</h4>
          </div>
          <div class="titleright fl"></div>
        </div>
        <div class="left_main_box_cont">
			 
			 <%
			 for(int i=0; i < secList.size();i++)
			 {
			     Row secInfo = (Row)secList.get(i);
			 %>
	          <ul class="ulist">
		          <li class="uhead">
		          <a href="<%=contextPath%>/web2/secAction.do?method=viewsec&secid=<%=secInfo.getString("id") %>" >
		          	<%=secInfo.getString("hos_name") %> &nbsp;&nbsp; <%=secInfo.getString("name") %>
		          </a>
		           <span class="yueye_1">已开通预约</span>
		          
		           </li>
		          <li><b>地址：</b><%=secInfo.getString("hos_address") %>&nbsp;&nbsp;</li>

	          </ul>
	          <%
	          }
	          %>
       <div class="pages">
          <p class="page"><%=pagingHtml %></p>
        </div>
        </div>
        <!--end left_main_box_cont-->
        <div class="left_box_bottom mb8">

        </div>
      </div>
      <!--end main_box--> 
    </div>
    <!--end main_left-->
    <%@ include file="right_1.jsp"%> 
    <!--end main_right--> 
  </div>
  
  <!--end main_left--> 
  
</div>
<!--end main-->

<%=request.getSession().getAttribute("footerContentWeb") %>
</body>
</html>